package com.mcb.autopublish.demos.web.controller;

import com.alibaba.dashscope.exception.InputRequiredException;
import com.alibaba.dashscope.exception.NoApiKeyException;
import com.mcb.autopublish.demos.web.service.AutoHandleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.io.IOException;
//java环境中文传值时，需特别注意字符编码问题


/**
 * <p>
 *
 * </p>
 *
 * @author mcb
 * @since 2024/5/28
 */
@Controller
public class AutoPublishArticleController {

    @Autowired
    private AutoHandleService autoHandleService;

    /**
     * 自动微信公众号文章发布-Java
     * @return
     */
    @RequestMapping("/getAuto")
    @ResponseBody
    public String autoPublishWeChatArticle() throws Exception {
        autoHandleService.autoPublishWeChatArticleJava();
        return "success";
    }






}
